package com.ruoyi.supplier.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbBankOutcomeNameMapper;
import com.ruoyi.supplier.domain.TbBankOutcomeName;
import com.ruoyi.supplier.service.ITbBankOutcomeNameService;

/**
 * 出账名目Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-14
 */
@Service
public class TbBankOutcomeNameServiceImpl implements ITbBankOutcomeNameService 
{
    @Autowired
    private TbBankOutcomeNameMapper tbBankOutcomeNameMapper;

    /**
     * 查询出账名目
     * 
     * @param id 出账名目ID
     * @return 出账名目
     */
    @Override
    public TbBankOutcomeName selectTbBankOutcomeNameById(Long id)
    {
        return tbBankOutcomeNameMapper.selectTbBankOutcomeNameById(id);
    }

    /**
     * 查询出账名目列表
     * 
     * @param tbBankOutcomeName 出账名目
     * @return 出账名目
     */
    @Override
    public List<TbBankOutcomeName> selectTbBankOutcomeNameList(TbBankOutcomeName tbBankOutcomeName)
    {
        return tbBankOutcomeNameMapper.selectTbBankOutcomeNameList(tbBankOutcomeName);
    }

    /**
     * 新增出账名目
     * 
     * @param tbBankOutcomeName 出账名目
     * @return 结果
     */
    @Override
    public int insertTbBankOutcomeName(TbBankOutcomeName tbBankOutcomeName)
    {
        tbBankOutcomeName.setCreateTime(DateUtils.getNowDate());
        return tbBankOutcomeNameMapper.insertTbBankOutcomeName(tbBankOutcomeName);
    }

    /**
     * 修改出账名目
     * 
     * @param tbBankOutcomeName 出账名目
     * @return 结果
     */
    @Override
    public int updateTbBankOutcomeName(TbBankOutcomeName tbBankOutcomeName)
    {
        tbBankOutcomeName.setUpdateTime(DateUtils.getNowDate());
        return tbBankOutcomeNameMapper.updateTbBankOutcomeName(tbBankOutcomeName);
    }

    /**
     * 批量删除出账名目
     * 
     * @param ids 需要删除的出账名目ID
     * @return 结果
     */
    @Override
    public int deleteTbBankOutcomeNameByIds(Long[] ids)
    {
        return tbBankOutcomeNameMapper.deleteTbBankOutcomeNameByIds(ids);
    }

    /**
     * 删除出账名目信息
     * 
     * @param id 出账名目ID
     * @return 结果
     */
    @Override
    public int deleteTbBankOutcomeNameById(Long id)
    {
        return tbBankOutcomeNameMapper.deleteTbBankOutcomeNameById(id);
    }
}
